package server

import (
	"app/internal/jobs"
	"app/internal/tasks"
	rabbitmqConf "github.com/go-eagle/eagle/pkg/queue/rabbitmq"
	"github.com/go-eagle/eagle/pkg/transport/consumer/rabbitmq"
)

// NewRabbitmqConsumerServer create a redis server
func NewRabbitmqConsumerServer() *rabbitmq.Server {
	rabbitmqConf.Load()

	srv := rabbitmq.NewServer()

	// register handler
	err := srv.RegisterHandler(tasks.TypeEmailWelcome, jobs.SendWelcomeEmailHandler)
	if err != nil {
		return nil
	}
	// here register other handlers...

	return srv
}
